<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Vue</title>
</head>
<body>
<div id="app">
  <h1>差值表达式</h1>
  <h3>{{ msg }}</h3>
  <h3>{{ count }}</h3>
  <h1>v-text</h1>
  <div v-text="msg"></div>
  <h1>v-html</h1>
  <div v-html="htmlMsg"></div>
  <button v-on:click="clickHandler">计次</button>
  <h1>v-model</h1>
  <label>
    msg:
    <input type="text" v-model="msg">
  </label>
  <label>
    count:
    <input type="text" v-model="count">
  </label>
  <label>
    htmlMsg:
    <input type="text" v-model="htmlMsg">
  </label>
</div>
<script src="js/dep.js"></script>
<script src="js/watcher.js"></script>
<script src="js/observer.js"></script>
<script src="js/compiler.js"></script>
<script src="js/vue.js"></script>
<script>
  const vm = new Vue({
    el: '#app',
    data: {
      msg: 'Hello Vue',
      htmlMsg: '<span>html-message</span>',
      count: 100,
      person: {
        name: 'zs'
      },
    },
    methods: {
      clickHandler(evt) {
        console.log(this.count);
        this.count ++;
        console.log(evt);
      }
    }
  })
</script>
</body>
</html>